﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Default/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Submenu" runat="server">
<div id="top-panel">
            <div id="panel">
                <ul>
					<li><a href="#adduser" class="useradd">Add user</a></li>
                    <li><a href="#" class="group">User groups</a></li>
            		<li><a href="#" class="search">Find user</a></li>
                    <li><a href="#" class="online">Users online</a></li>
                </ul>
            </div>
    </div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="box">
        <h3>Users</h3>
        <div>
            <asp:GridView ID="userList" runat="server" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="UserID" 
                DataSourceID="listAllUsers">
                <Columns>
                    <asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="UserID" />
                    <asp:BoundField DataField="Username" HeaderText="Username" 
                        SortExpression="Username" />
                    <asp:BoundField DataField="Password" HeaderText="Password" 
                        SortExpression="Password" />
                    <asp:BoundField DataField="RoleID" HeaderText="RoleID" 
                        SortExpression="RoleID" />
                    <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                        SortExpression="FirstName" />
                    <asp:BoundField DataField="LastName" HeaderText="LastName" 
                        SortExpression="LastName" />
                    <asp:BoundField DataField="AddressLine1" HeaderText="AddressLine1" 
                        SortExpression="AddressLine1" />
                    <asp:BoundField DataField="Country" HeaderText="Country" 
                        SortExpression="Country" />
                    <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="listAllUsers" runat="server" 
                ConnectionString="<%$ ConnectionStrings:FashionConnectionString %>" 
                
                SelectCommand="SELECT TOP (20) derivedtbl_1.* FROM (SELECT UserID, Username, Password, RoleID, FirstName, LastName, AddressLine1, Country, Phone, Email FROM Users) AS derivedtbl_1">
            </asp:SqlDataSource>
        </div>
    </div>
        <br />
       <div id="box">
        <h3 id="adduser">Add user</h3>
        <form id="addUserForm" action="" method="post">
        <fieldset id="account">
        <legend class="style1">ACCOUNT INFORMATION</legend>
            <label for="username">Username : </label> 
            <asp:textbox runat="server" id="username" TabIndex="1" />
            <br />
            <label for="password">Password : </label> 
            <asp:textbox runat="server" id="password" TabIndex="2" />
            <br />
            <label for="email">Email : </label> 
            <asp:textbox runat="server" id="email" TabIndex="3" />
            <br />
            <label for="role">Role ID: </label> 
            <asp:textbox runat="server" id="role" TabIndex="4" />
            <br />
        </fieldset>
        <fieldset id="personal">
        <legend>PERSONAL INFORMATION</legend>
            <label for="firstname">Firstname : </label> 
            <asp:textbox runat="server" id="firstname" TabIndex="5" />
            <br />
            <label for="lastname">Lastname : </label> 
            <asp:textbox runat="server" id="lastname" TabIndex="6" />
            <br />
            <label for="address1">Address Line 1 : </label> 
            <asp:textbox runat="server" id="address1" TabIndex="7" />
            <br />
            <label for="address2">Address Line 2 : </label> 
            <asp:textbox runat="server" id="address2" TabIndex="8" />
            <br />
            <label for="postal">Postal Code : </label> 
            <asp:textbox runat="server" id="postal" TabIndex="9" />
            <br />
            <label for="city">City : </label> 
            <asp:textbox runat="server" id="city" TabIndex="10" />
            <br />
            <label for="country">Country : </label> 
            <asp:DropDownList ID="countryList" runat="server" TabIndex="11">
                        <asp:ListItem Selected="True">Vietnam</asp:ListItem>
                        <asp:ListItem>United States</asp:ListItem>
                        <asp:ListItem>HongKong</asp:ListItem>
                        <asp:ListItem>China</asp:ListItem>
                    </asp:DropDownList>
            <br />
            <label for="phone">Phone : </label> 
            <asp:textbox runat="server" id="phone" TabIndex="12" />
            <br />
        </fieldset>
        <div align="center">
            <input id="button1" type="submit" value="Save" /> 
            <input id="button2" type="reset" />
        </div>
        </form>
    </div>
</asp:Content>

